package cn.tedu_two;

import java.io.*;

public class Test2 {
    public static void main(String[] args) throws IOException {
        method();
        method2();
    }
    private static void method() throws IOException {
        InputStream a=new FileInputStream("F:\\ideaIO\\1.txt");
        int b=0;
        while((b=a.read())!=-1){
            System.out.println(b);
        }
        a.close();
    }
    private static void method2() throws IOException {
        InputStream i=new BufferedInputStream(new FileInputStream("F:\\ideaIO\\1.txt"));
        int a=0;
        while((a=i.read())!=-1){
            System.out.println(a);
        }
        i.close();
    }
}
